--- title: Welcome to the Open Source DIY Hyperspectral Imager Library keywords: fastai sidebar: home_sidebar summary: "Library to calibrate, capture and process data cubes for the open source DIY hyperspectral camera. " description: "Library to calibrate, capture and process data cubes for the open source DIY hyperspectral camera. " nb_path: "nbs/index.ipynb" ---
This Python library is licensed under the Apache v2 License. The documentation is licensed under a Creative Commons Attribution 3.0 Australia License.
Documentation can be found here: https://openhsi.github.io/openhsi/.
Depending on your camera sensor, install:
This whole software library, testing suite, documentation website, and PyPI/conda package was developed in Jupyter Notebooks using nbdev. {% include important.html content='This library is under active development and new features are still being added. ' %}
If OpenHSI has been useful for your research, please acknowledge the project in your academic publication. We have a publication in progress.
@Article{ mao2022openhsi,
title = {OpenHSI: A complete open-source hyperspectral imaging solution for everyone},
author = {Yiwei Mao, and Christopher H. Betters, et al.},
year = {2022},
journal = {},
}
The example shown here uses a simulated camera for testing purposes. Replace SimulatedCamera with the appropriate Python class for your own camera to work with real hardware. For example, use LucidCamera imported from openhsi.cameras inplace of SimulatedCamera.
from openhsi.capture import *
with SimulatedCamera(img_path="assets/rocky_beach.png", n_lines=1024, processing_lvl = 3,
json_path="assets/cam_settings.json",pkl_path="assets/cam_calibration.pkl") as cam:
cam.collect()
fig = cam.show(plot_lib="matplotlib",robust=True)
fig.opts(fig_inches=7,title="simulated hyperspectral datacube")
{% include tip.html content='For more information on how to use this library, check out our Quick Start Guide.' %}
The hardware consists of a collimator tube with a slit (1) mounted in a 3D printed housing (2). A diffraction grating (3) is used to split the incoming light into its component colours to be detected on the camera sensor (4).
We have the following implementations in cameras module:
These all have the same interface so in principle, these OpenHSI cameras can be used interchangeably as long as you have the right calibration files.